package com.example.retrofitdemo616lixiao.activities;

import android.nfc.Tag;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.RadioButton;

import com.example.retrofitdemo618lw.R;

public class NewActivity extends MainActivity{
    private RadioButton radioButton1,radioButton2,radioButton3;


    protected void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity1);
        radioButton1=findViewById(R.id.radio_button1);
        radioButton2=findViewById(R.id.radio_button2);
        radioButton3=findViewById(R.id.radio_button3);


    }


    public void disableOthers(int viewId){
        if (R.id.radio_button1 !=viewId&&radioButton1.isChecked()){
            radioButton1.setChecked(false);
        }
        if (R.id.radio_button2 != viewId&&radioButton2.isChecked()){
            radioButton2.setChecked(false);
        }
        if (R.id.radio_button3 != viewId&&radioButton3.isChecked()){
            radioButton3.setChecked(false);
        }

    }
}
